package com.qf.entity.po;

import com.qf.entity.vo.CartInfoVo;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * 优惠券的上下文对象
 */
@Data
@Accessors(chain = true)
public class CouponContext implements Cloneable {
    //用户ID
    private Integer uid;
    //购物车的消息信息
    private List<CartInfoVo> cartInfoVos;
    //订单总价
    private Double allPrice;

    /**
     * 重写克隆方法
     * @return
     * @throws CloneNotSupportedException
     */
    @Override
    public Object clone() {
        try {
            return super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return null;
    }
}
